package com.zenika.zenbinding.client.exception;

/**
 * Superclass of all exception class of the framework. Contains a DataMessage.
 * @author Zenika
 */
public class DataException extends Exception {

	private static final long serialVersionUID = 1L;

	private DataMessage message;

	public DataException() {
		super();
	}

	/**
	 * Specific constructor in which the message displayed in the stack trace is
	 * specified.
	 * @param mess Stack trace message
	 */
	public DataException(String mess) {
		super(mess);
	}

	/**
	 * Constructor with setting of the DataMessage.
	 * @param message DataMessage
	 */
	public DataException(DataMessage message) {
		this.message = message;
	}

	/**
	 * The the DataMessage.
	 * @param message DateMessage
	 */
	public void setDataMessage(DataMessage message) {
		this.message = message;
	}

	/**
	 * Get the DataMessage.
	 * @return DataMessage
	 */
	public DataMessage getDataMessage() {
		return this.message;
	}
}
